package com.printerSpring;

public class Printer {
    private Ink ink =null;
    private Paper paper =null;

    public void setInk(Ink ink){
        this.ink =ink;
    }
    public void setPaper(Paper paper){
        this.paper =paper;
    }

    public void print(String str){
        System.out.print("使用"+ink.getColoe(255,200,0)+"颜色打印：\n");
        for(int i=0;i<str.length();++i){
            paper.putInChar(str.charAt(i));
        }
        System.out.print(paper.getContent());
    }
}
